﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>待发奖品列表</title>

    <link href="../css/jquery.dataTables.css" rel="stylesheet" />
    <link href="../library/bootstrap/css/bootstrap.css" rel="stylesheet" />
    <link href="../css/prizelist.css" rel="stylesheet" />
    <script src="../javascript/library/jquery-1.11.3.min.js"></script>
    <script src="../javascript/library/jquery.dataTables.min.js"></script>
    <script src="../library/bootstrap/js/bootstrap.min.js"></script>
    <script src="../library/avalon/avalon.min.js"></script>
</head>
<body ms-controller="avalon">
    <nav class="navbar navbar-default">
        <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">酷居科技</a>
            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav">
                    <li ><a href="../pages/scratchsettings.html">奖品配置 </a></li>
                    <li class="active"><a href="../pages/prizelist.html">出奖顺序<span class="sr-only">(current)</span></a></li>
                </ul>

            </div><!-- /.navbar-collapse -->
        </div><!-- /.container-fluid -->
    </nav>
    <div id="dvawardcontainer">
        <table class='display' cellspacing='0' id='tableaward' width="100%">
            <thead>
                <tr>
                    <th>待发奖项</th>
                    <th>预计出奖时间</th>
                </tr>
            </thead>
            <tbody>
                <tr ms-repeat="prizes">
                    <td>{{el.Prize}}</td>
                    <td>{{el.ReleaseTime|date("yyyy-MM-dd HH:mm:ss")}}</td>
                </tr>
            </tbody>
        </table>
    </div>
    <script type="text/javascript">
        avalon.ready(function () {
            var model = avalon.define("avalon", function (vm) {
                vm.prizes = {};
            });

            timeId = setInterval("this.getprizelist()", 1000);

            this.getprizelist = function () {
                $.getJSON("../controller/scrath.ashx", { "action": "getprizelist" }, function (json) {
                    model.prizes = json;
                    avalon.scan();
                }, "json");
            };

            $('#tableaward').dataTable({
                scrollX: true,
                scrollCollapse: true,
                "paging": false,
                "ordering": false,
                "info": false,
                "searching": false,
                "dom": '<"top"i>rt<"bottom"flp><"clear">',
                "oLanguage": {
                    "oPaginate": {
                        "sNext": "下一页",
                        "sPrevious": "上一页",
                    },
                    "sZeroRecords": "没有数据",
                    "sLengthMenu": "每页显示 _MENU_ 条记录",
                    "sSearch": "过滤:",
                }
            });
        });
    </script>
</body>
</html>
